-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Bump golangci-lint v2 #12088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
🌱 Bump golangci-lint v2 #12088
Conversation
/hold |
d79565d
to
de82fdf
Compare
2b74f5d
to
988c2a5
Compare
.golangci.yml
Outdated
text: 'SA1019: feature.ClusterResourceSet is deprecated: ClusterResourceSet feature is now GA and the corresponding feature flag will be removed in 1.12 release.' | ||
- linters: | ||
- staticcheck | ||
text: 'SA1019: .* is deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added this exclusive rule. The diagnostic should be reported before this PR, but prow couldn't collect it somehow.
So it's not problem to add new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was covered before via:
text: "SA1019: .*\\.Deprecated\\.V1Beta1.* is deprecated"
/assign @chrischdi |
988c2a5
to
d183f07
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Makefile
Outdated
@@ -160,9 +160,9 @@ GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)) | |||
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo | |||
|
|||
GOLANGCI_LINT_BIN := golangci-lint | |||
GOLANGCI_LINT_VER := $(shell cat .github/workflows/pr-golangci-lint.yaml | grep [[:space:]]version: | sed 's/.*version: //') | |||
GOLANGCI_LINT_VER := v2.0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revert this if possible and also use the native action (when not running kubeapilinter), because its visualization is a bit better.
d183f07
to
8025ba2
Compare
7e874af
to
15b826a
Compare
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
15b826a
to
25673d5
Compare
Signed-off-by: sivchari <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this. Looks promising, some last nits.
.golangci.yml
Outdated
- linters: | ||
- staticcheck | ||
text: 'SA1019: .* is deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- linters: | |
- staticcheck | |
text: 'SA1019: .* is deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped.' | |
# v1Beta1 deprecated fields | |
- linters: | |
- staticcheck | |
text: 'SA1019: .*\.Deprecated\.V1Beta1.* is deprecated' |
Let's keep the old regex here :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank :) Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last one :-)
Signed-off-by: sivchari <[email protected]>
2702f96
to
8530749
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
🎉
LGTM label has been added. Git tree hash: b95b8a4fa5432971a53d4acd8666d30638a42903
|
/assign @fabriziopandini |
What this PR does / why we need it:
golangci-lint v2 is already released and it's so helpful to maintain codebase until now and from now on, so let's migrate it from v1 to v2.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #12087
/kind cleanup
/kind bug
/area ci